<ion-header>
  <ion-navbar>
    <ion-title><b>执法服装</b></ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding style="background-color:#EFEFEF;">
  <ion-card *ngFor="let task of tasks">
    <ion-card-content>
        <ion-grid style="width:100%;">
          <ion-row style="max-height: 100px;" align-items-center>
              <ion-col col-2 col-sm-2 col-md-2 col-lg-1 col-xl-1><img src="assets/imgs/clothes.png"/></ion-col>
              <ion-col col-8 col-sm-8 col-md-8 col-lg-10 col-xl-10>
                    <div class="task-item"><span style="font-weight: bold;">{{task.taskTitle}}</span></div>
                    <div class="task-item"><span>{{task.taskDesc}}</span></div>
                    <div class="task-item"><span >{{task.publishDate}}--{{task.finishDate}}</span></div>
              </ion-col>
              <ion-col col-2 col-sm-2 col-md-2 col-lg-1 col-xl-1 >
                <div *ngIf="task.status == -1">
                    <img src="assets/imgs/end.png"/>
                </div>
                <div (click)="goToList(task.taskID)" *ngIf="task.status == 0">
                    <img src="assets/imgs/apply.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 1">
                  <img src="assets/imgs/applied.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 2">
                  <img src="assets/imgs/approving.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 3">
                  <img src="assets/imgs/rejected.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 4">
                  <img src="assets/imgs/approving.png"/>
                </div>
                <div (click)="recieve(task.taskID)" *ngIf="task.status == 5">
                  <img src="assets/imgs/purchase.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 6">
                  <img src="assets/imgs/recieve.png"/>
                </div>
                <div (click)="goToDetail(task)" *ngIf="task.status == 7">
                  <img src="assets/imgs/recieved.png"/>
                </div>
              </ion-col>
          </ion-row>
        </ion-grid>
    </ion-card-content>
  </ion-card>
</ion-content>